package thread.interrupt;

public class ThreadA implements Runnable {

    @Override
    public void run() {
        System.out.println("线程名称" + Thread.currentThread().getName() + "正在执行");
        synchronized (this) {
            try {
                this.wait(5000); //50秒
                System.out.println("我再等待5秒后继续开始运行");
            } catch (InterruptedException e) {
                System.out.println("我被其他线程打断了");
                //e.printStackTrace();
            }
            System.out.println("ok 我还在继续执行");
        }
    }
}
